package top.yxqz.number2.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import top.yxqz.number2.entity.User;
import top.yxqz.number2.service.UserService;

/**
 * @author: 余小小
 * @date: 2023/9/11
 * @description：用户控制层
 */
@RestController
public class UserController {


    @Autowired
    private UserService userService;

    /**
     * 查询用户信息
     * 从数据库中获取用户信息
     * 数据库：从dao的实现类中伪造一个对象信息（admin  123456)
     */
    @GetMapping("/user")
    public User getUserObj() {
        return userService.getUserObj();
    }
}
